package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VehicleTravelMapper;
import com.ruoyi.system.domain.VehicleTravel;
import com.ruoyi.system.service.IVehicleTravelService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-24
 */
@Service
public class VehicleTravelServiceImpl implements IVehicleTravelService 
{
    @Autowired
    private VehicleTravelMapper vehicleTravelMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param travelId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public VehicleTravel selectVehicleTravelByTravelId(Long travelId)
    {
        return vehicleTravelMapper.selectVehicleTravelByTravelId(travelId);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param vehicleTravel 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<VehicleTravel> selectVehicleTravelList(VehicleTravel vehicleTravel)
    {
        return vehicleTravelMapper.selectVehicleTravelList(vehicleTravel);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param vehicleTravel 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertVehicleTravel(VehicleTravel vehicleTravel)
    {
        vehicleTravel.setCreateTime(DateUtils.getNowDate());
        return vehicleTravelMapper.insertVehicleTravel(vehicleTravel);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param vehicleTravel 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateVehicleTravel(VehicleTravel vehicleTravel)
    {
        return vehicleTravelMapper.updateVehicleTravel(vehicleTravel);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param travelIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVehicleTravelByTravelIds(Long[] travelIds)
    {
        return vehicleTravelMapper.deleteVehicleTravelByTravelIds(travelIds);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param travelId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteVehicleTravelByTravelId(Long travelId)
    {
        return vehicleTravelMapper.deleteVehicleTravelByTravelId(travelId);
    }
}
